package com.fll.entity;

import com.fll.config.FinalFieldConfig;

import java.io.Serializable;
import java.util.List;

/**
 *
 * 首页大模块
 *
 * @Description
 * @Author fanlei
 * @Version 1.0
 * @Date 2018年09月12日
 */
public class CourseModel implements Serializable {

    /**
     * 父课程库的名字
     * 首页 > 职业课程库 > 后端开发 > J2EE > JSP
     */
    private List<String> parentName;

    /**
     * 模块名字
     */
    private String name;

    /**
     * 普通、VIP、认证专享
     */
    private String type;

    /**
     * 课程的url
     */
    private String courseUrl;
    /**
     * 课程id
     */
    private String courseId;

    /**
     * 课程详细列表
     */
    private List<CourseCatalogModel> courseDetailModels;

    /**
     * 模块所在的页数
     */
    private Integer currPage;

    /**
     * 总页数
     */
    private Integer total;

    public String getCourseUrl() {
        return courseUrl;
    }

    public void setCourseUrl(String courseUrl) {
        this.courseUrl = courseUrl;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public List<CourseCatalogModel> getCourseDetailModels() {
        return courseDetailModels;
    }

    public void setCourseDetailModels(List<CourseCatalogModel> courseDetailModels) {
        this.courseDetailModels = courseDetailModels;
    }

    public List<String> getParentName() {
        return parentName;
    }

    public void setParentName(List<String> parentName) {
        this.parentName = parentName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        if(FinalFieldConfig.RZ_ICON.equals(type)){
            type = "认证专享";
        }else if(FinalFieldConfig.VIP_ICON.equals(type)){
            type = "VIP";
        }else if(FinalFieldConfig.PLAYERICON.equals(type)) {
            type = "普通";
        }else {
            type = "未知";
        }
        this.type = type;
    }

    public Integer getCurrPage() {
        return currPage;
    }

    public void setCurrPage(Integer currPage) {
        this.currPage = currPage;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }


    @Override
    public String toString() {
        return "CourseModel{" +
                "parentName=" + parentName +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", courseUrl='" + courseUrl + '\'' +
                ", courseId='" + courseId + '\'' +
                ", courseDetailModels=" + courseDetailModels +
                ", currPage=" + currPage +
                ", total=" + total +
                '}';
    }
}
